Valid for Sitecore
5.2, 5.1.1
Create a Template
Prev Next |
To create a new Template:
- Choose a name for the Template logically, as it will be exposed to users, but following typical variable naming conventions as it will also be used in code conditionals.
- Determine if the new Template can inherit fields from an existing Template, or if a new Base Template should be created. For example, if all pages on the web site have fields in common, such as Title, NavTitle, Text, Keywords and Description, those Fields should be created in a Base Template which other Templates can inherit. Follow the instructions below to implement the Base Template if required before following the same instructions to create the new Template. Base Templates are commonly stored to the Base Templates folder under System in the Templating section.
- Log in to the Sitecore Desktop on a development server as a user with appropriate permissions.
- Open Template Manager.
- If Create a New Template is not visible, select View » Toolbar.
- If only a small number of custom Templates are required they can be stored under the Templates node; alternatively folders can be created to structure Templates beneath this node. Create and/or navigate to the appropriate folder for the new Template.
-
Either:
- Duplicate an existing Template and update properties, or:
-
Select Create a New Template and step through the wizard:
- The Template name can be important to rendering logic but may also be visible to users, who should more frequently work with the Master names. Name the Template logically, as it will be exposed to users, but following typical variable naming conventions as it will also be used in code conditionals.
- If the new Template should inherit structure from an existing Template, select that Template as the Base Template; otherwise leave the default value of System/Templates/Standard Template selected.
- Follow the instructions under HOWTO: Add Sections and Fields to Existing Templates to add Sections and Fields to the new Template.
- In the Workflow Section for the new Template, set Default Workflow to the Workflow which should be invoked by default for Items based on this Template.
- Configure the Layout Section of the new Template.
- Optionally, set the Icon Field in the Appearance Section to an image which should be displayed next to Items of this type in the content tree.
Prev Next